<template>
	<view>
		<remind-carinfo :dataBean="model"></remind-carinfo>

		<view class="item">

			<view style="display: inline-flex; height: 80rpx; justify-content: space-between; margin: 0 20rpx;">
				<u-icon name="order" color="#1573FF" label="离线信息" label-color="#333333" :customStyle="{'line-height': '80rpx',}">
				</u-icon>

				<text style="line-height: 80rpx; color: #FFC500;">{{(model.carGps?model.carGps.prompt:'')|filterNull}}</text>
			</view>


			<u-line color="#efefef" :customStyle="{'margin-bottom': '30rpx','display': 'block',}"></u-line>

			<view v-if="model.carGps != null &&model.orderCar != null &&model.vehicle != null ">
				<view class="text-line">
					<text class="text-name">租赁类型:</text>
					<text class="text-value">{{model.orderCar.rentTypeShow|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">车辆订单号:</text>
					<text class="text-value">{{model.orderCar.orderCarNo|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">车辆订单状态:</text>
					<text class="text-value">{{model.vehicle.carStatusShow|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">客户名称:</text>
					<text class="text-value">{{model.orderCar.customerName|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">联系电话:</text>
					<text class="text-value">{{model.orderCar.customerTel|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">租赁开始时间:</text>
					<text class="text-value">{{model.orderCar.timeStartRent|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">租赁结束时间:</text>
					<text class="text-value">{{model.orderCar.timeFinishRent|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">提车时间:</text>
					<text class="text-value">{{model.orderCar.timeDelivery|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">合同编号:</text>
					<text class="text-value">{{model.orderCar.contractNo|filterNull}}</text>
				</view>

				

				<view class="text-line">
					<text class="text-name" style="color: #FFC500;">最后一次上报时间: {{model.carGps.timeReported|filterNull}}</text>
				</view>


				<u-line color="#efefef" border-style="dashed" :customStyle="{'margin-bottom': '30rpx','display': 'block',}"></u-line>

				<view class="text-line">
					<text class="text-name">提单员:</text>
					<text class="text-value">{{model.orderCar.customerTel|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">联系电话:</text>
					<text class="text-value">{{model.orderCar.customerTel|filterNull}}</text>
				</view>

				<view class="text-line">
					<text class="text-name">所属渠道:</text>
					<text class="text-value">{{model.orderCar.customerTel|filterNull}}</text>
				</view>
			</view>

			<view v-else class="nodata">
				<image src="../../static/remind/no_qx.png" mode=""></image>

				<text>暂无离线信息</text>
			</view>

		</view>
	</view>
</template>

<script>
	import remindCarinfo from '../../components/remind-carinfo.vue';

	export default {
		components: {
			remindCarinfo,
		},

		data() {
			return {
				model: {
					carGps:{
						
					},
					orderCar:{
						
					},
					vehicle:{
						
					}
				},
				carId: '',
				gpsId: '',
			}
		},
		methods: {},

		onLoad(op) {
			this.carId = op.carId;
			this.gpsId = op.gpsId;

			this.$u.api.gpsDetail({
				carId: op.carId,
				componentId: op.gpsId
			}).then(
				res => {
					console.log('res', res);
					this.model = res;
				}

			);
		}
	}
</script>

<style lang="scss">
	.btn-detail {
		width: 180rpx;
		height: 60rpx;
		border-radius: 50rpx;
		color: white;
		text-align: center;
		background-color: $blue15;
		font-size: 26rpx;
		line-height: 60rpx;
		align-self: flex-end;
		margin: 10rpx 20rpx 10rpx;
	}

	.nodata {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;

		image {
			width: 200rpx;
			height: 100rpx;
		}

		text {
			margin-top: 35rpx;
			margin-bottom: 60rpx;
			font-size: 24rpx;
			color: #C5D3E8;
		}
	}
</style>
